﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using LastoRevival.Service.Contracts.Models;

namespace LastoRevival.Service.Implementations.Data.Sql.Converters
{
	public class EditPostModelCreator
	{
		public EditPostModelCreator()
		{

		}

		public EditPostModel Create(DataRow post)
		{
			var editPost = new EditPostModel
			{
				Body = string.Format("{0}", post["body"]),
				ForumID = (int)post["forumid"],
				PostID = (int)post["id"],
				UserID = (int)post["userid"],
				Subject = string.Format("{0}", post["subject"])
			};

			return editPost;
		}
	}
}
